﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="RepairNoComplete.aspx.cs" Inherits="WebApp.RepairingTickets.RepairNoComplete" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="scriptCssContent" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            $("#<%= btnSave.ClientID %>").click(function () {
                try {
                    var rdpCreatedDateForRepairNoComplete = $find("<%= rdpCreatedDateForRepairNoComplete.ClientID %>");
                    var txtDescription = $find("<%= txtDescription.ClientID %>");
                    var txtFullName = $find("<%= txtFullName.ClientID %>");
                    var rcbProductType = $find("<%= rcbProductType.ClientID %>");

                    if (!CheckRequireField(txtFullName, "Vui lòng nhập tên khách hàng!", 1, true)) {
                        return false;
                    }
                    if (!CheckRequireField(rcbProductType, "Vui lòng chọn loại sản phẩm!", 2, true)) {
                        return false;
                    }
                    if (!CheckRequireField(rdpCreatedDateForRepairNoComplete, "Vui lòng chọn ngày sửa chưa xong!", 3, true)) {
                        return false;
                    }
                    if (!CheckRequireField(txtDescription, "Vui lòng nhập lý do sửa chưa xong!", 1, true)) {
                        return false;
                    }

                    return true;
                } catch (e) {
                    alert(e);
                    return false;
                }
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="titlePlaceHolder" runat="server">
    <asp:literal id="pageTitle" runat="server"></asp:literal>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="menuPlaceHolder" runat="server">
    <one:TabStrip ID="tspTicketManagement" runat="server" selectedtabcssclass="Current">
        <one:Tab name="receivingTicket" NavigateUrl="~/ReceivingTicket/ReceivingTicketEdit.aspx" Text="<%$ Resources:Strings, ReceivingTicket%>"></one:Tab>
        <one:Tab Name="repairingTicket" NavigateUrl="~/RepairingTickets/RepairingTicketManagement.aspx" Text="<%$ Resources:Strings, RepairingTicket%>"></one:Tab>
        <one:Tab Name="checkWarranty" NavigateUrl="~/RepairingTickets/CheckWarrantyManagement.aspx" Text="<%$ Resources:Strings, CheckWarranty%>" AllowRoles="Administrators,WarrantyConfirmers"></one:Tab>
        <one:Tab Name="verifyRepairQuality" NavigateUrl="~/RepairingTickets/VerifyRepairQualityManagement.aspx" Text="<%$ Resources:Strings, VerifyRepairQuality%>" AllowRoles="Administrators,RepairQualityConfirmers"></one:Tab>
        <one:Tab Name="searchRepairInfomation" NavigateUrl="~/ReceivingTicket/ReceivingTicketManagement.aspx" Text="<%$ Resources:Strings, SearchRepairInfomation%>"></one:Tab>
    </one:TabStrip>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="contentPlaceHolder" runat="server">
    <table style="width:100%; border:0px;">
        <tr>
            <td colspan="4" style="text-align:center;"><h3>THÔNG TIN SỬA CHƯA XONG</h3></td>
        </tr>
    </table>

    <fieldset title="Thông tin khách hàng">
        <legend>Thông tin khách hàng</legend>
        <table style="width:100%; border:0px;">
            <tr>
                <td class="ISoft_LabelTitle" style="width:15%;">Họ tên <span class="ISoft_RequireField">*</span></td>
                <td class="ISoft_Input" style="width:35%;">
                    <telerik:RadTextBox ID="txtFullName" Runat="server" Skin="<%$ Resources:Strings, Skin%>" MaxLength="200" Width="100%"></telerik:RadTextBox>
                </td>

                <td class="ISoft_LabelTitle" style="width:15%;">Số điện thoại</td>
                <td class="ISoft_Input" style="width:35%;">
                    <telerik:RadTextBox ID="txtMobile" Runat="server" Skin="<%$ Resources:Strings, Skin%>" MaxLength="50" Width="100%"></telerik:RadTextBox>
                </td>
            </tr>

            <tr>
                <td class="ISoft_LabelTitle">Địa chỉ</td>
                <td class="ISoft_Input" colspan="3">
                    <telerik:RadTextBox ID="txtAddress" Runat="server" Skin="<%$ Resources:Strings, Skin%>" MaxLength="300" Width="100%"></telerik:RadTextBox>
                </td>
            </tr>
        </table>
    </fieldset>

    <fieldset title="Thông tin sản phẩm">
        <legend>Thông tin sản phẩm</legend>
        <table style="width:100%; border:1px;">
            <tr>
                <td class="ISoft_LabelTitle">Loại sửa chữa</td>
                <td class="ISoft_Input">
                    <telerik:RadComboBox 
                        ID="rcbRepairingType" Runat="server" Skin="<%$ Resources:Strings, Skin%>"
                        MarkFirstMatch="True" Width="100%" Height="150px" 
                        AllowCustomText="True" EmptyMessage="Chọn loại sửa chữa">
                        <ExpandAnimation Type="None" />
                        <CollapseAnimation Type="None" />
                    </telerik:RadComboBox>
                    
                </td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>

            <tr>
                <td class="ISoft_LabelTitle" style="width:15%;">Loại sản phẩm <span class="ISoft_RequireField">*</span></td>
                <td class="ISoft_Input" style="width:35%;">
                    <telerik:RadComboBox
                        ID="rcbProductType" Runat="server" Skin="<%$ Resources:Strings, Skin%>" 
                        MarkFirstMatch="True" Width="100%" Height="150px"
                        AllowCustomText="True" EmptyMessage="Chọn loại sản phẩm">
                        <ExpandAnimation Type="None" />
                        <CollapseAnimation Type="None" />
                    </telerik:RadComboBox>
                </td>

                <td class="ISoft_LabelTitle" style="width:15%;">Hãng sản xuất</td>
                <td class="ISoft_Input" style="width:35%;">
                    <telerik:RadComboBox
                        ID="rcbManufacturer" Runat="server" Skin="<%$ Resources:Strings, Skin%>" 
                        MarkFirstMatch="True" Width="100%" Height="150px"
                        AllowCustomText="True" EmptyMessage="Chọn hãng sản xuất">
                        <ExpandAnimation Type="None" />
                        <CollapseAnimation Type="None" />
                    </telerik:RadComboBox>
                </td>
            </tr>

            <tr>
                <td class="ISoft_LabelTitle">Số model</td>
                <td class="ISoft_Input">
                    <telerik:RadTextBox ID="txtModel" Runat="server" Skin="<%$ Resources:Strings, Skin%>" MaxLength="100" Width="100%"></telerik:RadTextBox>
                </td>

                <td class="ISoft_LabelTitle">Số serial</td>
                <td class="ISoft_Input">
                    <telerik:RadTextBox ID="txtSerialNumber" Runat="server" Skin="<%$ Resources:Strings, Skin%>" MaxLength="100" Width="100%"></telerik:RadTextBox>
                </td>
            </tr>

            <tr>
                <td class="ISoft_LabelTitle">Thông tin hư hỏng</td>
                <td class="ISoft_Input" colspan="3">
                    <telerik:RadTextBox ID="txtProductDescription" Runat="server" Skin="<%$ Resources:Strings, Skin%>" MaxLength="200" Width="100%" TextMode="MultiLine" Rows="3"></telerik:RadTextBox>
                </td>
            </tr>

            <tr>
                <td class="ISoft_LabelTitle">Ghi chú</td>
                <td class="ISoft_Input" colspan="3">
                    <telerik:RadTextBox ID="txtNote" Runat="server" Skin="<%$ Resources:Strings, Skin%>" MaxLength="4000" Width="100%" TextMode="MultiLine" Rows="6"></telerik:RadTextBox>
                </td>
            </tr>

        </table>
    </fieldset>

    <fieldset title="Thông tin tiếp nhận">
        <legend>Thông tin tiếp nhận</legend>
        <table style="width:100%; border:1px;">
            <tr>
                <td class="ISoft_LabelTitle" style="width:15%;">Ngày nhận</td>
                <td class="ISoft_Input" style="width:35%;">
                    <telerik:RadDatePicker ID="rdpCreatedDate" Runat="server" Skin="<%$ Resources:Strings, Skin%>" 
                                            Culture="Vietnamese (Vietnam)" Width="150px" Enabled="false">
                        <Calendar ID="Calendar1" runat="server" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" 
                                    ViewSelectorText="x" Skin="<%$ Resources:Strings, Skin%>" >
                        </Calendar>

                        <DatePopupButton ImageUrl="" HoverImageUrl="" ToolTip="Bấm vào đây để chọn ngày."></DatePopupButton>
                        <DateInput ID="DateInput1" runat="server" DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy" EmptyMessage="Chọn ngày tiếp nhận">
                            <ClientEvents OnError="DateError" />
                        </DateInput>
                        <ClientEvents OnDateSelected="DateSelected" />
                    </telerik:RadDatePicker>
                </td>

                <td class="ISoft_LabelTitle" style="width:15%;">Người nhận</td>
                <td class="ISoft_Input" style="width:35%;">
                    <telerik:RadComboBox 
                        ID="rcbReceivingEmployee" Runat="server" Skin="<%$ Resources:Strings, Skin%>" 
                        MarkFirstMatch="True" Width="100%" Height="150px"
                        AllowCustomText="True" EmptyMessage="Chọn người tiếp nhận" Enabled="false">
                        <ExpandAnimation Type="None" />
                        <CollapseAnimation Type="None" />
                    </telerik:RadComboBox>
                </td>
            </tr>
        </table>
    </fieldset>

    <fieldset title="Thông tin sửa chưa xong">
        <legend>Thông tin sửa chưa xong</legend>
        <table style="width:100%; border:0px;">
            <tr>
                <td class="ISoft_LabelTitle" style="width:15%;">Ngày sửa chưa xong <span class="ISoft_RequireField">*</span></td>
                <td class="ISoft_Input" style="width:35%;">
                    <telerik:RadDatePicker ID="rdpCreatedDateForRepairNoComplete" Runat="server" Skin="<%$ Resources:Strings, Skin%>" 
                                            Culture="Vietnamese (Vietnam)" Width="150px">
                        <Calendar ID="Calendar2" runat="server" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" 
                                    ViewSelectorText="x" Skin="<%$ Resources:Strings, Skin%>" >
                        </Calendar>

                        <DatePopupButton ImageUrl="" HoverImageUrl="" ToolTip="Bấm vào đây để chọn ngày."></DatePopupButton>
                        <DateInput ID="DateInput2" runat="server" DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy" EmptyMessage="Chọn ngày sửa chưa xong">
                            <ClientEvents OnError="DateError" />
                        </DateInput>
                        <ClientEvents OnDateSelected="DateSelected" />
                    </telerik:RadDatePicker>
                </td>

                <td class="ISoft_LabelTitle" style="width:15%;">Người nhận sửa</td>
                <td class="ISoft_Input" style="width:35%;">
                    <telerik:RadComboBox 
                        ID="rcbRepairer" Runat="server" Skin="<%$ Resources:Strings, Skin%>" 
                        MarkFirstMatch="True" Width="100%" Height="150px"
                        AllowCustomText="True" EmptyMessage="Chọn người nhận sửa" Enabled="false">
                        <ExpandAnimation Type="None" />
                        <CollapseAnimation Type="None" />
                    </telerik:RadComboBox>
                </td>
            </tr>

            <tr>
                <td class="ISoft_LabelTitle">Lý do sửa chưa xong <span class="ISoft_RequireField">*</span></td>
                <td class="ISoft_Input" colspan="3">
                    <telerik:RadTextBox ID="txtDescription" Runat="server" Skin="<%$ Resources:Strings, Skin%>" MaxLength="4000" Width="100%" TextMode="MultiLine" Rows="3"></telerik:RadTextBox>
                </td>
            </tr>

            <tr>
                <td class="ISoft_LabelTitle">Ghi chú</td>
                <td class="ISoft_Input" colspan="3">
                    <telerik:RadTextBox ID="txtNoteForRepair" Runat="server" Skin="<%$ Resources:Strings, Skin%>" MaxLength="4000" Width="100%" TextMode="MultiLine" Rows="6"></telerik:RadTextBox>
                </td>
            </tr>
        </table>
    </fieldset>

    <table style="width:100%; border:0px;">
        <tr>
            <td class="ISoft_ButtonsRow">
                <telerik:RadButton ID="btnSave" runat="server" 
                    Skin="<%$ Resources:Strings, Skin%>" Text="<%$ Resources:Strings, Save%>" 
                    Width="100px" onclick="btnSave_Click"></telerik:RadButton>
                <telerik:RadButton ID="btnBack" runat="server" 
                    Skin="<%$ Resources:Strings, Skin%>" Text="<%$ Resources:Strings, Back%>" 
                    Width="100px" onclick="btnBack_Click"></telerik:RadButton>
            </td>
        </tr>
    </table>
</asp:Content>
